<?php
namespace app\webadmin\model;

use think\Db;
use think\Model;

class Cate extends Model{

    protected $table = 'my_navigate';
    protected $resultSetType = 'collection';

    public function catelst($topcateid){
        $catelst = $this->where('pid','eq',$topcateid)->select()->toArray();
        return $catelst;

    }

    public function getcate($cid){
        $where = ['navigate_id'=>$cid];
        $cate = $this->where($where)->find();
        return $cate;
    }
}